package com.juneyao.bigdata.controller;


import com.juneyao.bigdata.domain.GroupPeopleVO;
import com.juneyao.bigdata.domain.ResultData;
import com.juneyao.bigdata.service.UserInteractiveService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author quanbiao
 * @date 2018-06-28
 * 用户controller
 */
@RequestMapping("/user")
@RestController
public class UserController {

    private Logger logger = LoggerFactory.getLogger("UserController");

    @Autowired
    private UserInteractiveService userService;

    /**
     * 分页查询
     * @param groupPeopleVO
     * @return
     */
    @RequestMapping(value = "detail",method = {RequestMethod.GET, RequestMethod.POST})
    public ResultData getUser(@RequestBody GroupPeopleVO groupPeopleVO){
        logger.info("logger starting....");
        logger.info("groupPeopleVO="+groupPeopleVO.toString());
        //分页查询
        ResultData result = userService.queryUserDetailForPage(groupPeopleVO);
        return result;
    }



}
